//
//  VTController.m
//  vTeam
//
//  Created by zhang hailong on 13-10-9.
//  Copyright (c) 2013年 hailong.org. All rights reserved.
//

#import "VTController.h"

#import <objc/runtime.h>

@interface VTController()
{
    Class _originalClass;
}

@end

@implementation VTController

@synthesize context = _context;
@synthesize delegate = _delegate;

- (id)delegate
{
    Class currentClass = object_getClass(_delegate);
    if (currentClass == _originalClass) {
        return _delegate;
    }else{
        return nil;
    }
}

- (void)setDelegate:(id)delegate
{
    _delegate = delegate;
    _originalClass = object_getClass(delegate);
}

@end
